﻿@model Promocot.Models.GenPromocion
           

@{
    ViewBag.Title = "Vista";
    int imp = 0;
    var dir_logo = "http://"+Request.Url.Authority + "/Content/images/logo_passarini.png";
}

<!DOCTYPE html>
<html>

<head>
<meta name="Description" content="Promocion, Cotizacion, sistema de Promociones y Ctizaciones" />
<meta name="Keywords" content="Promocion, Cotizacion, Passarini, Boletos Travel" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Distribution" content="Global" />
<meta name="Author" content="McArthur Leger - mleger45@gmail.com" />
 <title>@ViewBag.Title</title>
<link href="@Url.Content("~/Content/prettyPhoto.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/vista.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.prettyPhoto.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/paginator.js")" type="text/javascript"></script>
</head>

<body>
<div id="contenido">
@Html.ActionLink("Generar PDF","PDF/"+Model.promo.cod_promocion,"Promocion") | @Html.ActionLink("Volver","Detalle/"+Model.promo.cod_promocion,"Promocion") 
 @using(Html.BeginForm("Enviar_Correo","Promocion",FormMethod.Post)){<table><tr><td>@Html.Editor("idPromo",Model.promo.cod_promocion)</td><td>@Html.Editor("correo")</td><td><input type="submit" name="enviar" value="Enviar correo"/></td></tr></table>}
<h2 class="titulo">Promoción: @Model.promo.titulo</h2> 
@foreach (var im in Model.imagenes){
      if(im.tipo==2){
        <img src="@im.direccion" alt="@im.direccion"/>
     }
    }
<div id="detalles">
@{ var b = new HtmlString(@Model.promo.descripcion);
                }
            @b
</div>
<div id="v_detalle_tarifa">
<h3>Detalles de Tarifas</h3>
<table id="vistaDT">
<thead>
<tr>
<th scope="col">Detalle</th>
<th scope="col">Tarifa</th>
</tr>
</thead>
@foreach (var dt in Model.det_tarifas)
{

    if (imp % 2 != 0)
    {
        
        <tr><th>@dt.descripcion</th><td> @dt.Moneda.abreviacion @String.Format("{0:0.00}",dt.monto) </td></tr>
        
    }
    else
    {
        <tr class="odd"><th>@dt.descripcion</th><td> @dt.Moneda.abreviacion  @String.Format("{0:0.00}",dt.monto) </td></tr>
    }

    imp++;

}
</table>
</div>

<div id="v_imagenes">
<h3>Imagenes</h3>

	<ul class="gallery slideshow clearfix"> 
    @foreach (var im in Model.imagenes) {
        if (im.tipo != 2)
        {
<li><a href="@im.direccion" rel="prettyPhoto[pp_gal]" title="@im.nombre" ><img src="@im.direccion"  width="100" height="100" alt="@im.nombre"/></a></li>
        }
}
			</ul> 

</div>
</div>

			<script type="text/javascript" charset="utf-8">
			    $(document).ready(function () {
			        $("area[rel^='prettyPhoto']").prettyPhoto();

			        $(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({ animation_speed: 'normal', theme: 'light_square', slideshow: 3000, autoplay_slideshow: true });
			        $(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({ animation_speed: 'fast', slideshow: 10000, hideflash: true });

			        $("#custom_content a[rel^='prettyPhoto']:first").prettyPhoto({
			            custom_markup: '<div id="map_canvas" style="width:260px; height:265px"></div>',
			            changepicturecallback: function () { initialize(); }
			        });

			        $("#custom_content a[rel^='prettyPhoto']:last").prettyPhoto({
			            custom_markup: '<div id="bsap_1259344" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div><div id="bsap_1237859" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6" style="height:260px"></div><div id="bsap_1251710" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div>',
			            changepicturecallback: function () { _bsap.exec(); }
			        });
			    });
			</script> 



</body>
</html>